home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / util / gnu / emacs_src.lha / src / amiga / emacs-18.59 / unix / include / signal.h < prev    next >
C/C++ Source or Header  |  1992-10-18  |  2KB  |  60 lines

  1. #ifndef _SIGNAL_H
  2. #define _SIGNAL_H
  3.  
  4. #define NSIG 32            /* We define lots of signals (though most are never
  5.                    generated) */
  6.  
  7. /* Signal number definitions */
  8. /* Those which can be generated other than by kill are described with
  9.     <name>, amiga: <cause> */
  10.    
  11.  
  12. #define SIGHUP 1        /* hangup */
  13. #define SIGINT 2        /* interrupt, amiga: ctrl-c */
  14. #define SIGQUIT 3        /* quit, amiga: ctrl-d */
  15. #define SIGILL 4        /* illegal instruction */
  16. #define SIGTRAP 5        /* trace trap */
  17. #define SIGIOT 6        /* abort, amiga: abort() called */
  18. #define SIGEMT 7        /* emulator trap */
  19. #define SIGFPE 8        /* arithmetic exception, amiga: arith op */
  20. #define SIGKILL 9        /* kill */
  21. #define SIGBUS 10        /* bus error */
  22. #define SIGSEGV 11        /* segmentation violation */
  23. #define SIGSYS 12        /* bad argument to system call */
  24. #define SIGPIPE 13        /* write on pipe or socket with no reader,
  25.                    amiga: generated for 'pipe's or 'sktpair's */
  26. #define SIGALRM 14        /* alarm clock, amiga: see alarm */
  27. #define SIGTERM 15        /* software termination */
  28. #define SIGURG 16        /* urgent condition on socket */
  29. /* SIGSTOP, SIGTSTP, SIGCONT, SIGTTIN, SIGTTOU undefined to avoid creating the
  30.    belief that we support stopped processes */
  31. #define SIGCHLD 20        /* child status has changed */
  32. #define SIGIO 23        /* I/O possible on a descriptor */
  33. /* Less usual signals: SIGXCPU, SIGXFSZ, SIGVTALARM, SIGPROF, SIGLOST not defined */
  34. #define SIGWINCH 28        /* window changed */
  35. #define SIGUSR1 30        /* user-defined signal 1 */
  36. #define SIGUSR2 31        /* user-defined signal 2 */
  37.  
  38. #define SIG_IGN (void *)0
  39. #define SIG_DFL (void *)1
  40.  
  41. struct sigvec {
  42.   void (*sv_handler)();
  43.   long sv_mask;
  44.   /*int sv_flags;*/ /* Not implemented */
  45. };
  46.  
  47. void (*signal(int sig,void (*fn)(int)))(int);
  48. int sigvec(int sig, struct sigvec *vec, struct sigvec *ovec);
  49. long sigsetmask(long mask);
  50. long sigblock(long mask);
  51.  
  52. #define sigmask(s) (1 << (s))
  53.  
  54. /* Only kill(getpid(), sig) works */
  55. /* Also, getpid() is a unique number for this process */
  56. int getpid(void);
  57. int kill(int pid, int sig);
  58.  
  59. #endif
  60.